// 读取一个字符，输出其前驱、该字符、后继（ASCII排序），以及对应ASCII值
#include <stdio.h>

int main(void)
{
    char ch;
    // 使用前导空格跳过前面的空白字符（换行、空格等）
    if (scanf(" %c", &ch) != 1) {
        return 0;
    }

    char prev = (char)(ch - 1);
    char next = (char)(ch + 1);

    int prev_code = (unsigned char)prev;
    int code = (unsigned char)ch;
    int next_code = (unsigned char)next;

    printf("%c %c %c\n", prev, ch, next);
    printf("%d %d %d", prev_code, code, next_code);
    return 0;
}